<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>物流线路管理</title>
    <!-- Bootstrap -->
    <link href="../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div class="container">
    <nav th:replace="~{system/sys/sys_topbar::top}"></nav>
    <div class="page-header">
        <div class="row">
            <h1 class="col-md-3">物流线路管理 </h1>
            <!--<form class="form-inline col-md-4" style="margin: 20px">-->
                <!--<div class="form-group">-->
                    <!--<input type="text" class="form-control" name="comOrName" id="comOrName" style="width: 230px" placeholder="请输入供应商/客户或物资的名称">-->
                <!--</div>-->
                <!--<button type="submit" class="btn btn-default" id="searchBtn" >查询</button>-->
            <!--</form>-->
        </div>
        <a th:href="@{/routeAddBefore}"><button type="button" class="btn btn-info">添加物流专线</button></a>
    </div>
    <table class="table table-hover">
        <thead>
        <tr>
            <th>公司名称</th>
            <th>出发地</th>
            <th>到达地</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="route:${pageDTO.result}">
            <th><a th:text="${route.routeCompany}" th:href="@{'/com_detail_route?comName='+${route.routeCompany}}" target="_blank"></a></th>
            <th th:text="${route.routeResourceProvince}+${route.routeResourceCity}+${route.routeResourceCountry}"></th>
            <th th:text="${route.routeDestinationProvince}+${route.routeDestinationCity}+${route.routeDestinationCountry}"></th>
            <th style="width: 140px"><a th:href="@{'/route_detail?routeId='+${route.routeId}+'&page='+${pageDTO.page.getCurrent()}}"><button type="button" class="btn btn-link" style="padding: unset">详细信息>>></button></a></th>
            <th><a th:href="@{'/routeDelete?routeId='+${route.routeId}+'&page='+${pageDTO.page.getCurrent()}}"><button type="button" class="btn btn-danger" style="padding-bottom: unset; padding-top: unset">删除</button></a></th>
        </tr>
        </tbody>
    </table>
    <nav aria-label="Page navigation">
        <ul class="pagination">
            <li><a th:href="@{'route_manage?page=1'}">首页</a></li>
            <li th:unless="${pageDTO.page.hasPrevious()}" class="disabled">
                <a aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li th:if="${pageDTO.page.hasPrevious()}">
                <a aria-label="Previous" th:href="@{'/route_manage?page='+${pageDTO.page.getCurrent()-1}}">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li><span th:text="'第 '+${pageDTO.page.getCurrent()}+' 页/共 '+${pageDTO.page.getPages()}+' 页 '"></span></li>
            <li th:unless="${pageDTO.page.hasNext()}" class="disabled">
                <a aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li th:if="${pageDTO.page.hasNext()}">
                <a href="#" aria-label="Next" th:href="@{'/route_manage?page='+${pageDTO.page.getCurrent()+1}}">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li><a th:href="@{'/route_manage?page='+${pageDTO.page.getPages()}}">末页</a></li>
        </ul>
    </nav>
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="../jquery-3.3.1.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

<!--<script>-->
    <!--$("#searchBtn").click(function () {-->
        <!--var comOrName = $("#comOrName").val();-->
        <!--window.open("/findMaterialByCompany?comOrName="+comOrName);-->
    <!--})-->
<!--</script>-->

</body>
</html>